home *** CD-ROM | disk | FTP | other *** search
-
- ARCOPY.DOC
- ----------
- Instructions for ARCOPY.COM
- Version 1.71 (2 Oct 1991)
-
- (c)1988-91 E. Meyer
-
-
- ARCOPY (ARchive COPY) is a small, fast disk file copy utility for all
- MSDOS (2.x and above) systems. Its features are geared toward the tasks of
- backing up (archiving) files, and maintaining multiple copies of files; but it
- can also make ordinary file copying, moving, and renaming easier.
- ARCOPY is geared toward command line aficionados who want to be able to
- do as much as possible at one DOS prompt. It can copy different groups of
- files at once; copy all except certain files; backup files by time stamp or
- archive flag; select files to copy by existence on destination directory, or
- by prompting the user individually; move files easily from one directory to
- another; do ambiguous copying and renaming safely; and more.
-
- The syntax and options of ARCOPY are compatible with my DTA (directory/
- tree/attribute), DIRCMP (directory compare), and DLT (delete) utilities, which
- work well together.
-
-
- USING ARCOPY
- ------------
-
- SYNTAX: A>ARCOPY source{,source2,...} {dest} {/options} "{}"=optional
-
- Like DOS COPY, ARCOPY expects two arguments: a source and a
- destination filespec. However, the source may be a list of
- files as well, delimited with commas (unless option /X used).
- If the destination is omitted, the current directory is
- assumed. Any options may be specified after a slash "/".
- Either filespec may be ambiguous; destination filename
- defaults to same as source. Subdirectories are supported.
- Common device names (CON,PRN...) are also accepted.
-
- If NO arguments are given, ARCOPY loads into memory and gives a dash
- prompt (just like the CP/M utility PIP, if anybody remembers that). You can
- perform multiple copying operations, entering a set of arguments (source,dest)
- at each prompt, and can remove the disk containing ARCOPY if needed on systems
- without a hard disk. To exit, just press RETURN or ^C.
-
- If the source is a comma-delimited list, the previous filespec's drive
- and directory carry over to the next one, unless the latter itself begins with
- a drive or root directory.
-
- ARCOPY lists files in each source filespec alphabetically as it processes
- them; you may abort at any time by typing ^C. If the destination names are
- different, both names are shown: OLDFILE.NAM -> NEWFILE.NAM.
-
-
- OPTIONS: "Options" must be preceded by one slash "/"; separating
- spaces, and further slashes, are optional. Several (/A,M,P)
- are identical to DOS XCOPY utility options.
-
- /? - display help message
-
- /A - only files with the ARCHIVE attribute will be copied. (See "Incremental
- Backup" below for further explanation.)
- /B - only files with timestamp BEFORE specified date/time (see formats below)
- will be copied. (Defaults are today, 0 hours.)
- /E - only files previously EXISTING on the destination directory will be
- copied. (Normally used together with /T,A,M for incremental backup.)
- /H - HIDDEN and System files, normally ignored, will be found and copied
- along with normal files.
- /L - only files with timestamp LATER than specified date/time (see formats
- below) will be copied. (Defaults are today, 0 hours.)
- /M - only files with the Archive attribute are copied, and then MARKED by
- having their Archive attribute removed. (See "Incremental Backup" below.)
- /N - only files previously NOT existing on the destination directory will be
- copied.
- /P - you will be PROMPTED "y/n?" for each file about to be processed. Press
- "Y" to copy the file, or "N" to skip it.
- /R - files will be RENAMED or moved: renamed, if the directory is the same;
- moved, if the destination directory is different.
- /T - existing files on the destination directory will only be overwritten if
- the source copy has a more recent TIMESTAMP.
- /W - copying may WRITE over or delete Read/Only files. (Normally, any
- attempt to do this will cause a DOS R/O error.)
- /X - all files (*.*) EXCEPT those specified will be copied. (This option
- requires a single source, not a comma-delimited list.)
- /Z - the high (parity) bit will be ZEROED in the output file, which converts
- nonstandard data (like WordStar text) into readable ASCII form.
-
-
- INCREMENTAL BACKUP: /A,E,M,T
-
- It's important to maintain backup copies of important data, but this can
- be a tedious task. Fortunately you don't need to remember exactly which files
- have been modified recently; there are two automatic ways to update disks by
- selecting and copying just those files that need it ("incremental backup").
-
- (1) THE ARCHIVE ATTRIBUTE
- MSDOS maintains a file attribute called Archive. Whenever a disk file is
- modified, this attribute is set. Consequently, if this attribute was cleared
- in the past (the last time you did a backup), the files which now have it set
- are those you have created or changed since, and need to back up now.
- ARCOPY can copy just those modified files, and (if you want) clear their
- attribute again to indicate they have been archived. So all you have to type
- each time you want to back up the contents of a directory to disk B: is:
- ARCOPY *.* B: /M
- In conjunction with this, when you are first setting up your disks, you may
- find a use for a utility that can manually set or clear the Archive attribute
- on groups of files, such as my DTA.COM.
- The /A option works the same way, but does not reset the Archive
- attribute on files after copying. The /E option can be added to either one,
- in order to archive only a certain group of files (see below).
- (DOS 3.x users should look up the ATTRIB and XCOPY utilities in their
- manual for an alternative approach to the task.)
-
- (2) THE TIMESTAMP
- If your computer has a clock, the MSDOS file timestamp can also be used
- to determine whether one copy of a file has been modified more recently than
- another. Thus, you can also back up files to disk B: by typing:
- ARCOPY *.* B: /T
- Files that already exist on B: will only be copied if the source copy is more
- recent. In addition, all files that don't already exist on the destination
- directory will be copied, so B: will become a full backup for the current
- directory. If you want to avoid this, add the /E option:
- ARCOPY *.* B: /E/T
- This time only files already existing on B: are updated. This allows B: to be
- the backup for only a certain group of files in the current directory (which
- can therefore be backed up on multiple disks).
- This method of backup is the simplest; I now use it all the time.
- (DOS 3.x XCOPY has an option to copy all files changed since a given
- date, but ARCOPY's comparison is easier to use for backup purposes.)
-
-
- COPYING BY TIME STAMPS: /B,L
-
- With the /B and /L options, you can choose to copy only files dated
- before or later than a given date or time. (You can even use both together,
- to specify an interval of time.)
- In either case, the date and/or time should follow the option letter; if
- both are specified, separate them with a comma. If the time is omitted, it
- defaults to 0 hours (12 AM); if the date is omitted, it defaults to TODAY.
- ARCOPY recognizes U.S., European, and Numeric formats for entering each, by
- the punctuation used:
- U.S.(M/D/Y,H:MMa-p) Euro (D.M.Y,H:MM) Num (Y-M-D,HHMM)
- 3/25/90,1:45p = 25.3.90,13:45 = 90-3-25,1345
- (If you add the /A or /P option after a Euro format time, insert a slash or
- space so it doesn't look like a U.S. format time.) Examples:
- /L today (later than today, 0:00)
- /B12:45a before 12:45 AM today
- /L25.3.90,13:00 later than March 25 1990, 1 PM
- /L89-12-1 /B90-1-1 any time in December 1989
-
-
- MOVING AND RENAMING FILES: /R
-
- The /R option has powerful moving and renaming features, depending on the
- circumstances of its use. If the destination is another drive, files are
- copied and then the originals are deleted. If it is another directory on the
- same drive, files are quickly re-assigned to the new directory. If it is the
- same directory, files are simply renamed. Examples:
- B: A: /R move all files from drive B: to A:
- *.DOC \NEW /R move files *.DOC from current dir to \NEW
- *.DOC,*.TXT * /R remove filetype from all files *.DOC,*.TXT
-
-
- MISCELLANY: /H,N,P,W,X,Z
-
- The /H,/P,/W,/Z options are all quite straightforward. /N can be useful
- for reconciling two directories in a simple situation where different versions
- of the same file aren't an issue; it copies only files that aren't already in
- the destination directory. /X will copy everything except certain file(s) --
- note that it cannot be used with a comma-delimited list. Examples:
- *.COM,*.EXE B: /N copy all COM/EXE files not already on B:
- TEMP.NOT A: /X copy all files except TEMP.NOT to A:
-
-
- SAFE COPYING AND RENAMING
-
- Renaming groups of files (or copying them to new names) can create
- unexpected problems. If the wildcards match exactly (as in *.DOC to *.BAK)
- it's straightforward enough. But (unlike COPY or XCOPY) ARCOPY also lets you
- do more complex renaming safely, when it's difficult to forsee results which
- depend on the specific filenames encountered. Suppose you want to create
- backup copies on drive B: of some text files on drive A:. You might type:
- A>ARCOPY *.* B:*.BAK
- Now, if the files on drive A: were KLAATU.DOC, GORT.DOC, and NIKTO, this would
- work just fine, and ARCOPY would create copies (B:KLAATU.BAK etc) as intended.
- But suppose there had been a fourth file A:GORT.TXT. Both it and
- GORT.DOC would have to be copied to the same destination B:GORT.BAK, causing
- one file to overwrite the other, which is likely to be a bad idea. (X)COPY
- would go ahead and do this; and you'd think you had copies of all four files,
- when you only had three. ARCOPY is more intelligent: before processing each
- group of files (here *.*), it checks to make sure their output names are all
- different from one another (and from those of any previous groups), and if not
- it will give a warning ("Conflict") and skip the group.
- Similarly, ARCOPY will warn of situations where a file would be copied
- onto itself and destroyed ("Overwrite") or an illegal filename would be
- created ("Illegal"), and skip the offending group; (X)COPY would allow the
- error to occur, then announce it and quit.
-
-
- ABOUT DEVICES
-
- MSDOS provides a number of "device names" which may be used in place of a
- filename, as either source or destination. ARCOPY fully supports these: AUX,
- COM1-2, CON, LPT1-2, LST, PRN, NUL. The most useful are:
- CON - the console (keyboard input, screen output)
- PRN - printer output
- Console input is terminated with ^Z, RETURN. (Certain disk file specific
- options are not allowed with device I/O. Note also that ARCOPY reads disk
- files as binary data, and does NOT treat ^Z as an end of file marker.)
- Example: PAPER.DOC CON /Z types word processor file onscreen in ASCII
-
-
-
- ERROR MESSAGES
-
- <Bad argument> Missing or invalid file specification
- <Bad option> Illegal or disallowed option
- <Bad directory> Nonexistent drive/directory
- <Overwrite> Destination would have been the same as source
- <Conflict> Two sources would have copied to the same destination
- <Illegal> A file with an illegal name would have been constructed
- <Overflow> Too many files (over 1000; try copying fewer at once)
- <Read error> DOS error opening or reading source file
- <Write error> DOS error on output: full disk, read/only file, etc
- <No memory> Not enough memory available
- <Aborted> User pressed ^C to abort operation
-
- If an error occurs, ARCOPY sets the DOS error code, so that batch files
- can test the ERRORLEVEL to determine subsequent action. Normally 0, the value
- returned will be the sum of whichever of the following errors occurred:
- 1 = bad argument/option/directory 16 = disk error (read/write)
- 2 = out of memory 128 = user abort
- 4 = files skipped (overwrite/conflict/illegal/overflow)
-
-
- HISTORY
-
- ARCOPY 1.0 (Mar88) - First release, based on my previous CP/M utility ARCOPY.
- 1.01 (Apr88) - Fixed parsing of options with no second filename.
- 1.02 (May88) - Preserves original file time/date.
- 1.1 (Jul88) - New options /T, /?. Improved parsing.
- 1.2 (Apr89) - Comma-delimited multiple source lists.
- 1.3 (Oct89) - Improved efficiency of copying and moving files.
- 1.4 (Dec89) - New options /B, /L. Improved parsing.
- 1.5 (May90) - Small fixes; simplified multiple-source syntax.
- 1.6 (Apr91) - New option /X. Small fixes.
- 1.7 (May91) - US/Euro/Numeric time,date formats. Small fixes.
- 1.71 (Oct91) - Improved conflict detection; sets DOS ERRORLEVEL.
-
- ARCOPY and its documentation are (c)1988-91 E.Meyer, all rights reserved.
- They may be freely distributed, but not modified or sold for profit without my
- written consent. (Libraries may charge no more than $6 for a disk.) The user
- takes full responsibility for any damages resulting from the use of this
- program.
-
- Eric Meyer
- 3541 Smuggler Way CompuServe [74415,1305]
- Boulder, CO 80303 USA
-
-